﻿using netDxf;
using netDxf.Entities;
using Vector2 = netDxf.Vector2;

namespace Vben.Extend.Oa;

[ApiDescriptionSettings("Ext", Tag = "Test-Two")]
public class OaTestTwoApi : IDynamicApiController
{


    [QueryParameters]
    public void GetDxf(string id)
    {
        // your DXF file name
        string file = "sample2.dxf";

        // create a new document, by default it will create an AutoCad2000 DXF version
        DxfDocument doc = new DxfDocument();
        // an entity
        Line entity = new Line(new Vector2(5, 5), new Vector2(10, 5));
        // add your entities here
        doc.AddEntity(entity);
        // doc.Entities.Add(entity);
        // doc.Entities.Add(entity);
        // save to file
        doc.Save(file);

    }
}